<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    ★★★★★ 扩展运算符可以将数组或者对象转为用逗号分隔的参数序列。

    <script>
        // 数组
        // let a = [1, 2, 3]
        // let b = [4, 5, 6]
        // let c = [...a, ...b]
        // console.log(c);
        let name = {
            name: '张三',
        };
        let age = {
            age: 18,
        };
        let person = {...name,
            ...age
        };
        console.log(person);
    </script>
</body>

</html>